<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>填充狗 - 配置</title>
    <style>
      body {
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        margin: 0;
        padding: 10px;
        width: 380px;
        background-color: #f4f7fa;
        color: #333;
      }

      h3 {
        text-align: center;
        font-size: 18px;
        color: #2c3e50;
      }

      .container {
        background-color: #fff;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 15px;
      }

      input,
      select,
      button {
        margin: 8px 0;
        width: 100%;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
        font-size: 14px;
      }

      input:focus,
      select:focus,
      button:focus {
        border-color: #3498db;
        outline: none;
      }

      button {
        background-color: #3498db;
        color: #fff;
        cursor: pointer;
        font-weight: bold;
      }

      button:hover {
        background-color: #2980b9;
      }

      h4 {
        font-size: 16px;
        margin-top: 20px;
        color: #2c3e50;
      }

      ul {
        padding-left: 0;
        margin: 0;
        list-style-type: none;
      }

      li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        margin-bottom: 8px;
        background-color: #fff;
        border-radius: 6px;
        border: 1px solid #ddd;
        transition: background-color 0.3s, box-shadow 0.3s;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      }

      li:hover {
        background-color: #f1f1f1;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      }

      li span {
        color: #3498db;
        font-weight: bold;
      }

      .delete-btn {
        background-color: #e74c3c;
        color: #fff;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s, transform 0.3s;
      }

      .delete-btn:hover {
        background-color: #c0392b;
        transform: scale(1.05);
      }

      /* 美化下拉选择框 */
      select {
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-color: #fff;
        background-image: url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"%3e%3cpath fill="%23aaa" d="M0 4l6 6 6-6z"%3e%3c/path%3e%3c/svg%3e');
        background-position: right 10px center;
        background-repeat: no-repeat;
        background-size: 10px 6px;
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        font-size: 14px;
        color: #333;
        line-height: 1.4;
      }

      select option {
        font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
        font-size: 14px;
        color: #333;
        padding: 10px;
      }

      select:focus option:checked {
        background-color: #3498db;
        color: white;
      }
      .checkbox-group {
      display: flex;
      flex-direction: row;  /* 改为行排列 */
      gap: 20px;           /* 两个复选框之间的间距 */
      align-items: center;  /* 垂直居中 */
      }

      .checkbox-container {
        display: flex;
        align-items: center;
      }

      .checkbox-container input[type="checkbox"] {
        width: auto;
        margin-right: 8px;
        accent-color: #3498db;
      }

      .checkbox-container label {
        font-size: 14px;
        cursor: pointer;
        user-select: none;
        white-space: nowrap; /* 防止文字换行 */
      }
      
    </style>
  </head>
  <body>
    <div class="container">
      <button id="exportConfig">导出配置</button>
      <input type="file" id="importConfig" style="display: none" />
      <button id="importConfigBtn">导入配置</button>
    </div>
    <!-- 新增的复选框组 -->
    <div class="container">
      <div class="checkbox-group">
        <div class="checkbox-container">
          <input type="checkbox" id="fillPdfCheckbox" checked>
          <label for="fillPdfCheckbox">填充文件</label>
        </div>
        <div class="checkbox-container">
          <input type="checkbox" id="fillDropdownCheckbox" checked>
          <label for="fillDropdownCheckbox">填充下拉框</label>
        </div>
      </div>
      </div>

  </div>
    <h3>添加填充配置</h3>
    <div class="container">
      <input type="text" id="fieldName" placeholder="输入字段名称" />
      <select id="fieldType">
        <option value="nil">空白</option>
        <option value="name">姓名</option>
        <option value="address">地址</option>
        <option value="email">邮箱</option>
        <option value="department">部门</option>
        <option value="school">学校</option>
        <option value="position">职位</option>
        <option value="webSite">网址</option>
        <option value="lon">经度</option>
        <option value="lat">纬度</option>
        <option value="tag">标签</option>
        <option value="street">街道</option>
        <option value="town">乡镇</option>
        <option value="group">分组(第一组)</option>
        <option value="number">数字(1-50)</option>
        <option value="ip">IP地址</option>
        <option value="phone">手机号</option>
        <option value="carNumber">车牌号</option>
        <option value="idCard">身份证号</option>
        <option value="bankCard">银行卡号</option>
        <option value="company">公司名称</option>
        <option value="postalCode">邮政编码</option>
        <option value="systemName">系统名称</option>
        <option value="qqgx">亲戚关系</option>
        <option value="led">LED大屏名称</option>
      </select>
      <button id="addConfig">添加配置</button>
    </div>

    <h4>已保存配置:</h4>
    <ul id="configList"></ul>

    <script src="popup.js"></script>
  </body>
</html>
